<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<body>
	<ui:composition>
		<f:event listener="#{weeklyController.init}" type="preRenderComponent"></f:event>

		<ui:remove>
			<p:dataGrid value="#{weeklyModel.list}" var="weekly" circular="false"
				headerText="Don't wishy-washy,just follow us. "
				footerText="#{msgs.mayBeChanged}" rows="3" style="font-size:0.8em">
			</p:dataGrid>
		</ui:remove>
		<p:dataGrid id="weeklySelectionTable" value="#{weeklyModel.list}"
			var="weekly" rows="3" paginator="true"
			paginatorTemplate=" {PreviousPageLink} {PageLinks} {NextPageLink}"
			style="width:100%;font-size:0.8em">
			<p:column headerText="Don't wishy-washy,just follow us."
				footerText="#{msgs.mayBeChanged}">
				<p:panel header="#{weekly.startDateLabel} To #{weekly.endDateLabel}"
					footer="#{msgs.year}: #{weekly.year} #{msgs.week}: #{weekly.weekOfYear}"
					style="width:310px;height:900px;font-size:1.0em">
					<p:dataGrid var="productPrice" value="#{weekly.productPrices}"
						paginator="true"
						paginatorTemplate=" {PreviousPageLink} {NextPageLink}"
						paginatorAlwaysVisible="false" columns="1" style="height:850px">
						<p:column style="width:100%">
							<h:panelGrid columns="2" cellspacing="5px" style="width:100%">
								<h:panelGroup>
									<p:commandLink oncomplete="productInfoDlg.show()"
										update=":dialogForm" ajax="true">
										<f:setPropertyActionListener value="#{productPrice.product}"
											target="#{productController.modelCurrent}" />
										<h:graphicImage library="images"
											value="../#{productPrice.product.icon}32.png"></h:graphicImage>
									</p:commandLink>
									<h:outputText value="#{productPrice.product.nameLabel}"
										style="float:left" />
								</h:panelGroup>
								<h:outputText value="
										#{productPrice.unitPriceLabel}"
									style="float:right" />
							</h:panelGrid>
						</p:column>
					</p:dataGrid>
				</p:panel>
			</p:column>
		</p:dataGrid>
		<p:effect type="slide" event="load" speed="300"
			for="weeklySelectionTable" />
	</ui:composition>
</body>
</html>